package priv.pfz.basedao.annotations;

import priv.pfz.basedao.sharding.ShardingStrategy;

import java.lang.annotation.*;

/**
 * 标注在Entity类的字段上，若SQL中指定了此字段，则自动按切分策略进行分库分表
 * @author yyjxp
 * 2024/1/28 19:01
 */
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface ShardingKey {
    /**
     * 切分策略类
     */
    Class<? extends ShardingStrategy<?>> shardingStrategy();
}
